{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Using TensorFlow backend.\n"
     ]
    }
   ],
   "source": [
    "import keras\n",
    "from keras.datasets import cifar10\n",
    "from keras.preprocessing.image import ImageDataGenerator\n",
    "from keras.models import Sequential\n",
    "from keras.layers import Dense, Dropout, Activation, Flatten\n",
    "from keras.layers import Conv2D, MaxPooling2D\n",
    "from keras.optimizers import Adam\n",
    "from keras.callbacks import ReduceLROnPlateau\n",
    "import numpy as np\n",
    "import os\n",
    "import wandb\n",
    "from wandb.keras import WandbCallback\n",
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "W&B Run: https://app.wandb.ai/l2k2/cifar/runs/k9q4itov\n",
      "Call `%%wandb` in the cell containing your training loop to display live results.\n"
     ]
    }
   ],
   "source": [
    "wandb.init(project=\"cifar\")\n",
    "config = wandb.config\n",
    "config.dropout = 0.25\n",
    "config.dense_layer_nodes = 100\n",
    "config.batch_size = 32\n",
    "config.epochs = 50\n",
    "\n",
    "class_names = ['airplane','automobile','bird','cat','deer',\n",
    "               'dog','frog','horse','ship','truck']\n",
    "num_classes = len(class_names)\n",
    "\n",
    "(X_train, y_train), (X_test, y_test) = cifar10.load_data()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Convert class vectors to binary class matrices.\n",
    "y_train = keras.utils.to_categorical(y_train, num_classes)\n",
    "y_test = keras.utils.to_categorical(y_test, num_classes)\n",
    "\n",
    "X_train = X_train.astype('float32') / 255.\n",
    "X_test = X_test.astype('float32') / 255."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [],
   "source": [
    "model = Sequential()\n",
    "model.add(Conv2D(32, (3, 3), padding='same',\n",
    "                 input_shape=X_train.shape[1:], activation='relu'))\n",
    "model.add(MaxPooling2D(pool_size=(2, 2)))\n",
    "model.add(Dropout(config.dropout))\n",
    "\n",
    "model.add(Flatten())\n",
    "model.add(Dense(config.dense_layer_nodes, activation='relu'))\n",
    "model.add(Dropout(config.dropout))\n",
    "model.add(Dense(num_classes, activation='softmax'))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [],
   "source": [
    "learn_rate = 0.004\n",
    "batch_size = 128\n",
    "model.compile(loss='categorical_crossentropy',\n",
    "              optimizer=Adam(learn_rate),\n",
    "              metrics=['accuracy'])\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "W&B Run: https://app.wandb.ai/l2k2/cifar/runs/snh4qfgk\n",
      "Call `%%wandb` in the cell containing your training loop to display live results.\n",
      "Train on 50000 samples, validate on 10000 samples\n",
      "Epoch 1/300\n",
      "50000/50000 [==============================] - 6s 127us/step - loss: 1.7099 - acc: 0.3735 - val_loss: 1.4350 - val_acc: 0.4841\n",
      "Epoch 2/300\n",
      "50000/50000 [==============================] - 5s 106us/step - loss: 1.4578 - acc: 0.4704 - val_loss: 1.3006 - val_acc: 0.5401\n",
      "Epoch 3/300\n",
      "50000/50000 [==============================] - 5s 102us/step - loss: 1.3725 - acc: 0.5022 - val_loss: 1.2329 - val_acc: 0.5600\n",
      "Epoch 4/300\n",
      "50000/50000 [==============================] - 5s 103us/step - loss: 1.3162 - acc: 0.5239 - val_loss: 1.2082 - val_acc: 0.5682\n",
      "Epoch 5/300\n",
      "50000/50000 [==============================] - 5s 102us/step - loss: 1.2727 - acc: 0.5380 - val_loss: 1.1415 - val_acc: 0.5951\n",
      "Epoch 6/300\n",
      "50000/50000 [==============================] - 5s 103us/step - loss: 1.2365 - acc: 0.5553 - val_loss: 1.1835 - val_acc: 0.5781\n",
      "Epoch 7/300\n",
      "50000/50000 [==============================] - 5s 104us/step - loss: 1.2057 - acc: 0.5644 - val_loss: 1.1102 - val_acc: 0.6050\n",
      "Epoch 8/300\n",
      "50000/50000 [==============================] - 5s 104us/step - loss: 1.1760 - acc: 0.5718 - val_loss: 1.1041 - val_acc: 0.6117\n",
      "Epoch 9/300\n",
      "50000/50000 [==============================] - 5s 106us/step - loss: 1.1667 - acc: 0.5778 - val_loss: 1.1390 - val_acc: 0.6034\n",
      "Epoch 10/300\n",
      "50000/50000 [==============================] - 5s 104us/step - loss: 1.1382 - acc: 0.5895 - val_loss: 1.1196 - val_acc: 0.6128\n",
      "Epoch 11/300\n",
      "50000/50000 [==============================] - 5s 106us/step - loss: 1.1321 - acc: 0.5915 - val_loss: 1.1606 - val_acc: 0.5999\n",
      "Epoch 12/300\n",
      "50000/50000 [==============================] - 5s 104us/step - loss: 1.1130 - acc: 0.5983 - val_loss: 1.1082 - val_acc: 0.6046\n",
      "Epoch 13/300\n",
      "50000/50000 [==============================] - 5s 102us/step - loss: 1.1012 - acc: 0.5988 - val_loss: 1.1275 - val_acc: 0.6069\n",
      "Epoch 14/300\n",
      "50000/50000 [==============================] - 5s 103us/step - loss: 1.0911 - acc: 0.6036 - val_loss: 1.1093 - val_acc: 0.6038\n",
      "Epoch 15/300\n",
      "50000/50000 [==============================] - 5s 103us/step - loss: 1.0777 - acc: 0.6089 - val_loss: 1.0947 - val_acc: 0.6178\n",
      "Epoch 16/300\n",
      "50000/50000 [==============================] - 5s 102us/step - loss: 1.0695 - acc: 0.6127 - val_loss: 1.0794 - val_acc: 0.6257\n",
      "Epoch 17/300\n",
      "50000/50000 [==============================] - 5s 103us/step - loss: 1.0613 - acc: 0.6146 - val_loss: 1.0882 - val_acc: 0.6129\n",
      "Epoch 18/300\n",
      "50000/50000 [==============================] - 5s 102us/step - loss: 1.0497 - acc: 0.6183 - val_loss: 1.0890 - val_acc: 0.6177\n",
      "Epoch 19/300\n",
      "50000/50000 [==============================] - 5s 104us/step - loss: 1.0471 - acc: 0.6193 - val_loss: 1.0915 - val_acc: 0.6178\n",
      "Epoch 20/300\n",
      "50000/50000 [==============================] - 5s 102us/step - loss: 1.0397 - acc: 0.6215 - val_loss: 1.1324 - val_acc: 0.6094\n",
      "Epoch 21/300\n",
      "50000/50000 [==============================] - 5s 103us/step - loss: 1.0316 - acc: 0.6242 - val_loss: 1.0991 - val_acc: 0.6144\n",
      "Epoch 22/300\n",
      "50000/50000 [==============================] - 5s 103us/step - loss: 1.0265 - acc: 0.6230 - val_loss: 1.0830 - val_acc: 0.6186\n",
      "Epoch 23/300\n",
      "50000/50000 [==============================] - 5s 102us/step - loss: 1.0110 - acc: 0.6288 - val_loss: 1.0751 - val_acc: 0.6203\n",
      "Epoch 24/300\n",
      "50000/50000 [==============================] - 5s 103us/step - loss: 1.0094 - acc: 0.6304 - val_loss: 1.0798 - val_acc: 0.6227\n",
      "Epoch 25/300\n",
      "50000/50000 [==============================] - 5s 102us/step - loss: 1.0102 - acc: 0.6316 - val_loss: 1.1127 - val_acc: 0.6090\n",
      "Epoch 26/300\n",
      "50000/50000 [==============================] - 5s 104us/step - loss: 1.0036 - acc: 0.6329 - val_loss: 1.0788 - val_acc: 0.6251\n",
      "Epoch 27/300\n",
      "50000/50000 [==============================] - 5s 103us/step - loss: 0.9962 - acc: 0.6338 - val_loss: 1.0726 - val_acc: 0.6258\n",
      "Epoch 28/300\n",
      "50000/50000 [==============================] - 5s 103us/step - loss: 0.9863 - acc: 0.6364 - val_loss: 1.1465 - val_acc: 0.6176\n",
      "Epoch 29/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.9821 - acc: 0.6412 - val_loss: 1.0737 - val_acc: 0.6249\n",
      "Epoch 30/300\n",
      "50000/50000 [==============================] - 5s 103us/step - loss: 0.9711 - acc: 0.6433 - val_loss: 1.0876 - val_acc: 0.6260\n",
      "Epoch 31/300\n",
      "50000/50000 [==============================] - 5s 104us/step - loss: 0.9753 - acc: 0.6428 - val_loss: 1.0773 - val_acc: 0.6258\n",
      "Epoch 32/300\n",
      "50000/50000 [==============================] - 5s 105us/step - loss: 0.9689 - acc: 0.6457 - val_loss: 1.1027 - val_acc: 0.6172\n",
      "Epoch 33/300\n",
      "50000/50000 [==============================] - 5s 103us/step - loss: 0.9572 - acc: 0.6470 - val_loss: 1.0793 - val_acc: 0.6238\n",
      "Epoch 34/300\n",
      "50000/50000 [==============================] - 5s 103us/step - loss: 0.9591 - acc: 0.6499 - val_loss: 1.0728 - val_acc: 0.6236\n",
      "Epoch 35/300\n",
      "50000/50000 [==============================] - 5s 102us/step - loss: 0.9585 - acc: 0.6500 - val_loss: 1.1268 - val_acc: 0.6123\n",
      "Epoch 36/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.9480 - acc: 0.6526 - val_loss: 1.1091 - val_acc: 0.6175\n",
      "Epoch 37/300\n",
      "50000/50000 [==============================] - 5s 103us/step - loss: 0.9505 - acc: 0.6500 - val_loss: 1.1154 - val_acc: 0.6230\n",
      "Epoch 38/300\n",
      "50000/50000 [==============================] - 5s 103us/step - loss: 0.8796 - acc: 0.6746 - val_loss: 1.0591 - val_acc: 0.6359\n",
      "Epoch 39/300\n",
      "50000/50000 [==============================] - 5s 107us/step - loss: 0.8679 - acc: 0.6804 - val_loss: 1.0630 - val_acc: 0.6348\n",
      "Epoch 40/300\n",
      "50000/50000 [==============================] - 5s 107us/step - loss: 0.8672 - acc: 0.6780 - val_loss: 1.0548 - val_acc: 0.6348\n",
      "Epoch 41/300\n",
      "50000/50000 [==============================] - 5s 105us/step - loss: 0.8582 - acc: 0.6817 - val_loss: 1.0587 - val_acc: 0.6379\n",
      "Epoch 42/300\n",
      "50000/50000 [==============================] - 5s 104us/step - loss: 0.8588 - acc: 0.6842 - val_loss: 1.0567 - val_acc: 0.6366\n",
      "Epoch 43/300\n",
      "50000/50000 [==============================] - 5s 103us/step - loss: 0.8544 - acc: 0.6831 - val_loss: 1.0597 - val_acc: 0.6380\n",
      "Epoch 44/300\n",
      "50000/50000 [==============================] - 5s 103us/step - loss: 0.8555 - acc: 0.6838 - val_loss: 1.0529 - val_acc: 0.6358\n",
      "Epoch 45/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8494 - acc: 0.6882 - val_loss: 1.0509 - val_acc: 0.6377\n",
      "Epoch 46/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8438 - acc: 0.6887 - val_loss: 1.0551 - val_acc: 0.6381\n",
      "Epoch 47/300\n",
      "50000/50000 [==============================] - 5s 102us/step - loss: 0.8437 - acc: 0.6865 - val_loss: 1.0560 - val_acc: 0.6373\n",
      "Epoch 48/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8447 - acc: 0.6874 - val_loss: 1.0485 - val_acc: 0.6408\n",
      "Epoch 49/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8373 - acc: 0.6892 - val_loss: 1.0556 - val_acc: 0.6399\n",
      "Epoch 50/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8441 - acc: 0.6883 - val_loss: 1.0548 - val_acc: 0.6385\n",
      "Epoch 51/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8385 - acc: 0.6883 - val_loss: 1.0527 - val_acc: 0.6401\n",
      "Epoch 52/300\n",
      "50000/50000 [==============================] - 5s 102us/step - loss: 0.8349 - acc: 0.6924 - val_loss: 1.0600 - val_acc: 0.6394\n",
      "Epoch 53/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8391 - acc: 0.6918 - val_loss: 1.0540 - val_acc: 0.6423\n",
      "Epoch 54/300\n",
      "50000/50000 [==============================] - 5s 102us/step - loss: 0.8400 - acc: 0.6880 - val_loss: 1.0542 - val_acc: 0.6408\n",
      "Epoch 55/300\n",
      "50000/50000 [==============================] - 5s 102us/step - loss: 0.8405 - acc: 0.6917 - val_loss: 1.0540 - val_acc: 0.6389\n",
      "Epoch 56/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8330 - acc: 0.6916 - val_loss: 1.0553 - val_acc: 0.6414\n",
      "Epoch 57/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8278 - acc: 0.6920 - val_loss: 1.0569 - val_acc: 0.6392\n",
      "Epoch 58/300\n",
      "50000/50000 [==============================] - 5s 104us/step - loss: 0.8338 - acc: 0.6914 - val_loss: 1.0634 - val_acc: 0.6389\n",
      "Epoch 59/300\n",
      "50000/50000 [==============================] - 5s 99us/step - loss: 0.8200 - acc: 0.6962 - val_loss: 1.0548 - val_acc: 0.6418\n",
      "Epoch 60/300\n",
      "50000/50000 [==============================] - 5s 99us/step - loss: 0.8235 - acc: 0.6943 - val_loss: 1.0537 - val_acc: 0.6417\n",
      "Epoch 61/300\n",
      "50000/50000 [==============================] - 5s 103us/step - loss: 0.8237 - acc: 0.6946 - val_loss: 1.0538 - val_acc: 0.6421\n",
      "Epoch 62/300\n",
      "50000/50000 [==============================] - 5s 102us/step - loss: 0.8221 - acc: 0.6961 - val_loss: 1.0542 - val_acc: 0.6420\n",
      "Epoch 63/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8164 - acc: 0.6962 - val_loss: 1.0543 - val_acc: 0.6422\n",
      "Epoch 64/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8230 - acc: 0.6937 - val_loss: 1.0540 - val_acc: 0.6422\n",
      "Epoch 65/300\n",
      "50000/50000 [==============================] - 5s 102us/step - loss: 0.8132 - acc: 0.6978 - val_loss: 1.0542 - val_acc: 0.6412\n",
      "Epoch 66/300\n",
      "50000/50000 [==============================] - 5s 102us/step - loss: 0.8226 - acc: 0.6951 - val_loss: 1.0532 - val_acc: 0.6428\n",
      "Epoch 67/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8187 - acc: 0.6975 - val_loss: 1.0526 - val_acc: 0.6425\n",
      "Epoch 68/300\n",
      "50000/50000 [==============================] - 5s 104us/step - loss: 0.8184 - acc: 0.6968 - val_loss: 1.0547 - val_acc: 0.6430\n",
      "Epoch 69/300\n",
      "50000/50000 [==============================] - 5s 107us/step - loss: 0.8199 - acc: 0.6954 - val_loss: 1.0537 - val_acc: 0.6426\n",
      "Epoch 70/300\n",
      "50000/50000 [==============================] - 5s 102us/step - loss: 0.8129 - acc: 0.6971 - val_loss: 1.0535 - val_acc: 0.6420\n",
      "Epoch 71/300\n",
      "50000/50000 [==============================] - 5s 103us/step - loss: 0.8188 - acc: 0.6967 - val_loss: 1.0535 - val_acc: 0.6417\n",
      "Epoch 72/300\n",
      "50000/50000 [==============================] - 5s 103us/step - loss: 0.8213 - acc: 0.6971 - val_loss: 1.0534 - val_acc: 0.6415\n",
      "Epoch 73/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8197 - acc: 0.6950 - val_loss: 1.0534 - val_acc: 0.6415\n",
      "Epoch 74/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8193 - acc: 0.6958 - val_loss: 1.0533 - val_acc: 0.6414\n",
      "Epoch 75/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8192 - acc: 0.6941 - val_loss: 1.0530 - val_acc: 0.6417\n",
      "Epoch 76/300\n",
      "50000/50000 [==============================] - 5s 103us/step - loss: 0.8200 - acc: 0.6992 - val_loss: 1.0531 - val_acc: 0.6421\n",
      "Epoch 77/300\n",
      "50000/50000 [==============================] - 5s 103us/step - loss: 0.8162 - acc: 0.6976 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 78/300\n",
      "50000/50000 [==============================] - 5s 102us/step - loss: 0.8155 - acc: 0.6968 - val_loss: 1.0530 - val_acc: 0.6415\n",
      "Epoch 79/300\n",
      "50000/50000 [==============================] - 5s 103us/step - loss: 0.8174 - acc: 0.6992 - val_loss: 1.0530 - val_acc: 0.6416\n",
      "Epoch 80/300\n",
      "50000/50000 [==============================] - 5s 102us/step - loss: 0.8162 - acc: 0.6970 - val_loss: 1.0530 - val_acc: 0.6417\n",
      "Epoch 81/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8191 - acc: 0.6995 - val_loss: 1.0530 - val_acc: 0.6418\n",
      "Epoch 82/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8203 - acc: 0.6949 - val_loss: 1.0531 - val_acc: 0.6417\n",
      "Epoch 83/300\n",
      "50000/50000 [==============================] - 5s 102us/step - loss: 0.8131 - acc: 0.7005 - val_loss: 1.0531 - val_acc: 0.6417\n",
      "Epoch 84/300\n",
      "50000/50000 [==============================] - 5s 102us/step - loss: 0.8157 - acc: 0.6977 - val_loss: 1.0531 - val_acc: 0.6418\n",
      "Epoch 85/300\n",
      "50000/50000 [==============================] - 5s 104us/step - loss: 0.8152 - acc: 0.6968 - val_loss: 1.0531 - val_acc: 0.6418\n",
      "Epoch 86/300\n",
      "50000/50000 [==============================] - 5s 102us/step - loss: 0.8166 - acc: 0.6969 - val_loss: 1.0531 - val_acc: 0.6417\n",
      "Epoch 87/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8194 - acc: 0.6921 - val_loss: 1.0531 - val_acc: 0.6418\n",
      "Epoch 88/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8177 - acc: 0.6967 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 89/300\n",
      "50000/50000 [==============================] - 5s 104us/step - loss: 0.8180 - acc: 0.6979 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 90/300\n",
      "50000/50000 [==============================] - 5s 103us/step - loss: 0.8140 - acc: 0.6981 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 91/300\n",
      "50000/50000 [==============================] - 5s 103us/step - loss: 0.8170 - acc: 0.6954 - val_loss: 1.0531 - val_acc: 0.6418\n",
      "Epoch 92/300\n",
      "50000/50000 [==============================] - 5s 105us/step - loss: 0.8145 - acc: 0.6986 - val_loss: 1.0531 - val_acc: 0.6418\n",
      "Epoch 93/300\n",
      "50000/50000 [==============================] - 5s 106us/step - loss: 0.8199 - acc: 0.6958 - val_loss: 1.0531 - val_acc: 0.6418\n",
      "Epoch 94/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8188 - acc: 0.6950 - val_loss: 1.0531 - val_acc: 0.6418\n",
      "Epoch 95/300\n",
      "50000/50000 [==============================] - 5s 102us/step - loss: 0.8133 - acc: 0.6994 - val_loss: 1.0531 - val_acc: 0.6418\n",
      "Epoch 96/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8129 - acc: 0.6987 - val_loss: 1.0531 - val_acc: 0.6418\n",
      "Epoch 97/300\n",
      "50000/50000 [==============================] - 5s 103us/step - loss: 0.8152 - acc: 0.6967 - val_loss: 1.0531 - val_acc: 0.6418\n",
      "Epoch 98/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8200 - acc: 0.6960 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 99/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8148 - acc: 0.6969 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 100/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8223 - acc: 0.6949 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 101/300\n",
      "50000/50000 [==============================] - 5s 102us/step - loss: 0.8207 - acc: 0.6953 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 102/300\n",
      "50000/50000 [==============================] - 5s 99us/step - loss: 0.8144 - acc: 0.6983 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 103/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8188 - acc: 0.6973 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 104/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8179 - acc: 0.6971 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 105/300\n",
      "50000/50000 [==============================] - 5s 102us/step - loss: 0.8172 - acc: 0.6982 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 106/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8188 - acc: 0.6985 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 107/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8158 - acc: 0.6951 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 108/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8202 - acc: 0.6966 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 109/300\n",
      "50000/50000 [==============================] - 5s 104us/step - loss: 0.8146 - acc: 0.6960 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 110/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8154 - acc: 0.6989 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 111/300\n",
      "50000/50000 [==============================] - 5s 99us/step - loss: 0.8141 - acc: 0.6964 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 112/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8192 - acc: 0.6955 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 113/300\n",
      "50000/50000 [==============================] - 5s 102us/step - loss: 0.8223 - acc: 0.6956 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 114/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8220 - acc: 0.6952 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 115/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8213 - acc: 0.6944 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 116/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8193 - acc: 0.6965 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 117/300\n",
      "50000/50000 [==============================] - 5s 102us/step - loss: 0.8140 - acc: 0.6988 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 118/300\n",
      "50000/50000 [==============================] - 5s 104us/step - loss: 0.8185 - acc: 0.6972 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 119/300\n",
      "50000/50000 [==============================] - 5s 107us/step - loss: 0.8151 - acc: 0.6988 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 120/300\n",
      "50000/50000 [==============================] - 5s 105us/step - loss: 0.8234 - acc: 0.6930 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 121/300\n",
      "50000/50000 [==============================] - 5s 99us/step - loss: 0.8145 - acc: 0.6985 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 122/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8132 - acc: 0.6988 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 123/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8169 - acc: 0.6972 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 124/300\n",
      "50000/50000 [==============================] - 5s 99us/step - loss: 0.8145 - acc: 0.6983 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 125/300\n",
      "50000/50000 [==============================] - 5s 99us/step - loss: 0.8145 - acc: 0.6972 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 126/300\n",
      "50000/50000 [==============================] - 5s 99us/step - loss: 0.8111 - acc: 0.6990 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 127/300\n",
      "50000/50000 [==============================] - 5s 99us/step - loss: 0.8201 - acc: 0.6958 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 128/300\n",
      "50000/50000 [==============================] - 5s 99us/step - loss: 0.8167 - acc: 0.6976 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 129/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8189 - acc: 0.6966 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 130/300\n",
      "50000/50000 [==============================] - 5s 99us/step - loss: 0.8233 - acc: 0.6959 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 131/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8200 - acc: 0.6962 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 132/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8160 - acc: 0.6983 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 133/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8240 - acc: 0.6943 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 134/300\n",
      "50000/50000 [==============================] - 5s 99us/step - loss: 0.8200 - acc: 0.6955 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 135/300\n",
      "50000/50000 [==============================] - 5s 99us/step - loss: 0.8133 - acc: 0.7001 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 136/300\n",
      "50000/50000 [==============================] - 5s 99us/step - loss: 0.8153 - acc: 0.6978 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 137/300\n",
      "50000/50000 [==============================] - 5s 99us/step - loss: 0.8168 - acc: 0.6985 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 138/300\n",
      "50000/50000 [==============================] - 5s 99us/step - loss: 0.8162 - acc: 0.6961 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 139/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8082 - acc: 0.6993 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 140/300\n",
      "50000/50000 [==============================] - 5s 99us/step - loss: 0.8215 - acc: 0.6973 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 141/300\n",
      "50000/50000 [==============================] - 5s 99us/step - loss: 0.8140 - acc: 0.6976 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 142/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8186 - acc: 0.6979 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 143/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8214 - acc: 0.6968 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 144/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8227 - acc: 0.6980 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 145/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8194 - acc: 0.6947 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 146/300\n",
      "50000/50000 [==============================] - 5s 99us/step - loss: 0.8206 - acc: 0.6968 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 147/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8146 - acc: 0.6979 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 148/300\n",
      "50000/50000 [==============================] - 5s 99us/step - loss: 0.8128 - acc: 0.6995 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 149/300\n",
      "50000/50000 [==============================] - 5s 99us/step - loss: 0.8206 - acc: 0.6998 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 150/300\n",
      "50000/50000 [==============================] - 5s 99us/step - loss: 0.8127 - acc: 0.6996 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 151/300\n",
      "50000/50000 [==============================] - 5s 99us/step - loss: 0.8151 - acc: 0.6973 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 152/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8193 - acc: 0.6946 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 153/300\n",
      "50000/50000 [==============================] - 5s 102us/step - loss: 0.8151 - acc: 0.6992 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 154/300\n",
      "50000/50000 [==============================] - 5s 103us/step - loss: 0.8197 - acc: 0.6957 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 155/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8192 - acc: 0.6962 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 156/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8192 - acc: 0.6976 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 157/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8205 - acc: 0.6950 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 158/300\n",
      "50000/50000 [==============================] - 5s 99us/step - loss: 0.8190 - acc: 0.6944 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 159/300\n",
      "50000/50000 [==============================] - 5s 99us/step - loss: 0.8191 - acc: 0.6960 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 160/300\n",
      "50000/50000 [==============================] - 5s 99us/step - loss: 0.8157 - acc: 0.6972 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 161/300\n",
      "50000/50000 [==============================] - 5s 104us/step - loss: 0.8193 - acc: 0.6964 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 162/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8184 - acc: 0.6970 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 163/300\n",
      "50000/50000 [==============================] - 5s 99us/step - loss: 0.8158 - acc: 0.6977 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 164/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8190 - acc: 0.6963 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 165/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8129 - acc: 0.6999 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 166/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8154 - acc: 0.6972 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 167/300\n",
      "50000/50000 [==============================] - 5s 99us/step - loss: 0.8232 - acc: 0.6940 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 168/300\n",
      "50000/50000 [==============================] - 5s 99us/step - loss: 0.8211 - acc: 0.6959 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 169/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8221 - acc: 0.6950 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 170/300\n",
      "50000/50000 [==============================] - 5s 99us/step - loss: 0.8115 - acc: 0.7006 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 171/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8163 - acc: 0.6982 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 172/300\n",
      "50000/50000 [==============================] - 5s 99us/step - loss: 0.8178 - acc: 0.6982 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 173/300\n",
      "50000/50000 [==============================] - 5s 99us/step - loss: 0.8215 - acc: 0.6968 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 174/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8144 - acc: 0.6979 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 175/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8215 - acc: 0.6975 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 176/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8201 - acc: 0.6946 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 177/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8213 - acc: 0.6962 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 178/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8225 - acc: 0.6937 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 179/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8143 - acc: 0.6963 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 180/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8144 - acc: 0.6991 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 181/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8112 - acc: 0.7000 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 182/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8160 - acc: 0.6971 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 183/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8162 - acc: 0.6972 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 184/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8161 - acc: 0.6974 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 185/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8244 - acc: 0.6951 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 186/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8145 - acc: 0.6978 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 187/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8178 - acc: 0.6961 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 188/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8178 - acc: 0.6970 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 189/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8149 - acc: 0.6982 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 190/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8164 - acc: 0.6974 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 191/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8171 - acc: 0.6982 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 192/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8162 - acc: 0.6971 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 193/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8224 - acc: 0.6935 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 194/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8142 - acc: 0.6966 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 195/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8125 - acc: 0.6972 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 196/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8149 - acc: 0.6967 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 197/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8147 - acc: 0.6978 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 198/300\n",
      "50000/50000 [==============================] - 5s 99us/step - loss: 0.8152 - acc: 0.6991 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 199/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8167 - acc: 0.6967 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 200/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8198 - acc: 0.6977 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 201/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8133 - acc: 0.6981 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 202/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8154 - acc: 0.6973 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 203/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8189 - acc: 0.6951 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 204/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8218 - acc: 0.6965 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 205/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8160 - acc: 0.6980 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 206/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8149 - acc: 0.6985 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 207/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8192 - acc: 0.6960 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 208/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8204 - acc: 0.6941 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 209/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8183 - acc: 0.6960 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 210/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8164 - acc: 0.6978 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 211/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8193 - acc: 0.6963 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 212/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8162 - acc: 0.6998 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 213/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8170 - acc: 0.6987 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 214/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8100 - acc: 0.7022 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 215/300\n",
      "50000/50000 [==============================] - 5s 102us/step - loss: 0.8161 - acc: 0.6984 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 216/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8200 - acc: 0.6972 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 217/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8166 - acc: 0.6998 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 218/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8204 - acc: 0.6945 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 219/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8132 - acc: 0.6988 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 220/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8155 - acc: 0.6959 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 221/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8183 - acc: 0.6982 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 222/300\n",
      "50000/50000 [==============================] - 5s 102us/step - loss: 0.8135 - acc: 0.7000 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 223/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8161 - acc: 0.6952 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 224/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8101 - acc: 0.7006 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 225/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8172 - acc: 0.6993 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 226/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8226 - acc: 0.6945 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 227/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8174 - acc: 0.6977 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 228/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8169 - acc: 0.6970 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 229/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8190 - acc: 0.6966 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 230/300\n",
      "50000/50000 [==============================] - 5s 99us/step - loss: 0.8211 - acc: 0.6953 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 231/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8127 - acc: 0.6992 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 232/300\n",
      "50000/50000 [==============================] - 5s 99us/step - loss: 0.8216 - acc: 0.6959 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 233/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8189 - acc: 0.6960 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 234/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8194 - acc: 0.6970 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 235/300\n",
      "50000/50000 [==============================] - 5s 99us/step - loss: 0.8189 - acc: 0.6952 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 236/300\n",
      "50000/50000 [==============================] - 5s 99us/step - loss: 0.8125 - acc: 0.6981 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 237/300\n",
      "50000/50000 [==============================] - 5s 99us/step - loss: 0.8196 - acc: 0.6963 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 238/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8108 - acc: 0.7002 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 239/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8219 - acc: 0.6936 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 240/300\n",
      "50000/50000 [==============================] - 5s 99us/step - loss: 0.8123 - acc: 0.6992 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 241/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8188 - acc: 0.6944 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 242/300\n",
      "50000/50000 [==============================] - 5s 98us/step - loss: 0.8181 - acc: 0.6948 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 243/300\n",
      "50000/50000 [==============================] - 5s 99us/step - loss: 0.8092 - acc: 0.7000 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 244/300\n",
      "50000/50000 [==============================] - 5s 104us/step - loss: 0.8216 - acc: 0.6970 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 245/300\n",
      "50000/50000 [==============================] - 5s 102us/step - loss: 0.8175 - acc: 0.6957 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 246/300\n",
      "50000/50000 [==============================] - 5s 98us/step - loss: 0.8182 - acc: 0.6964 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 247/300\n",
      "50000/50000 [==============================] - 5s 99us/step - loss: 0.8148 - acc: 0.6961 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 248/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8193 - acc: 0.6961 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 249/300\n",
      "50000/50000 [==============================] - 5s 102us/step - loss: 0.8129 - acc: 0.6992 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 250/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8190 - acc: 0.6959 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 251/300\n",
      "50000/50000 [==============================] - 5s 104us/step - loss: 0.8139 - acc: 0.6994 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 252/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8177 - acc: 0.6957 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 253/300\n",
      "50000/50000 [==============================] - 5s 102us/step - loss: 0.8137 - acc: 0.6941 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 254/300\n",
      "50000/50000 [==============================] - 5s 103us/step - loss: 0.8306 - acc: 0.6905 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 255/300\n",
      "50000/50000 [==============================] - 5s 102us/step - loss: 0.8155 - acc: 0.6968 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 256/300\n",
      "50000/50000 [==============================] - 5s 102us/step - loss: 0.8159 - acc: 0.6956 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 257/300\n",
      "50000/50000 [==============================] - 5s 103us/step - loss: 0.8185 - acc: 0.6974 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 258/300\n",
      "50000/50000 [==============================] - 5s 102us/step - loss: 0.8140 - acc: 0.6959 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 259/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8174 - acc: 0.6978 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 260/300\n",
      "50000/50000 [==============================] - 5s 102us/step - loss: 0.8153 - acc: 0.6971 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 261/300\n",
      "50000/50000 [==============================] - 5s 102us/step - loss: 0.8177 - acc: 0.6973 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 262/300\n",
      "50000/50000 [==============================] - 5s 103us/step - loss: 0.8171 - acc: 0.6964 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 263/300\n",
      "50000/50000 [==============================] - 5s 105us/step - loss: 0.8164 - acc: 0.6958 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 264/300\n",
      "50000/50000 [==============================] - 5s 102us/step - loss: 0.8191 - acc: 0.6990 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 265/300\n",
      "50000/50000 [==============================] - 5s 102us/step - loss: 0.8180 - acc: 0.6963 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 266/300\n",
      "50000/50000 [==============================] - 5s 103us/step - loss: 0.8171 - acc: 0.6964 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 267/300\n",
      "50000/50000 [==============================] - 5s 103us/step - loss: 0.8165 - acc: 0.6958 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 268/300\n",
      "50000/50000 [==============================] - 5s 103us/step - loss: 0.8160 - acc: 0.6964 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 269/300\n",
      "50000/50000 [==============================] - 5s 104us/step - loss: 0.8167 - acc: 0.6960 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 270/300\n",
      "50000/50000 [==============================] - 5s 104us/step - loss: 0.8178 - acc: 0.6970 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 271/300\n",
      "50000/50000 [==============================] - 5s 104us/step - loss: 0.8169 - acc: 0.6965 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 272/300\n",
      "50000/50000 [==============================] - 5s 102us/step - loss: 0.8167 - acc: 0.6968 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 273/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8145 - acc: 0.6972 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 274/300\n",
      "50000/50000 [==============================] - 5s 104us/step - loss: 0.8141 - acc: 0.6996 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 275/300\n",
      "50000/50000 [==============================] - 5s 102us/step - loss: 0.8093 - acc: 0.6998 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 276/300\n",
      "50000/50000 [==============================] - 5s 102us/step - loss: 0.8141 - acc: 0.6996 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 277/300\n",
      "50000/50000 [==============================] - 5s 103us/step - loss: 0.8206 - acc: 0.6971 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 278/300\n",
      "50000/50000 [==============================] - 5s 104us/step - loss: 0.8138 - acc: 0.6987 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 279/300\n",
      "50000/50000 [==============================] - 5s 102us/step - loss: 0.8216 - acc: 0.6955 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 280/300\n",
      "50000/50000 [==============================] - 5s 105us/step - loss: 0.8155 - acc: 0.6974 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 281/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8173 - acc: 0.6944 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 282/300\n",
      "50000/50000 [==============================] - 5s 103us/step - loss: 0.8137 - acc: 0.6976 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 283/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8183 - acc: 0.6965 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 284/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8156 - acc: 0.6995 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 285/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8142 - acc: 0.6981 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 286/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8125 - acc: 0.6970 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 287/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8139 - acc: 0.6982 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 288/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8189 - acc: 0.6980 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 289/300\n",
      "50000/50000 [==============================] - 5s 102us/step - loss: 0.8139 - acc: 0.6990 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 290/300\n",
      "50000/50000 [==============================] - 5s 106us/step - loss: 0.8103 - acc: 0.6983 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 291/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8158 - acc: 0.6974 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 292/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8148 - acc: 0.6978 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 293/300\n",
      "50000/50000 [==============================] - 5s 103us/step - loss: 0.8171 - acc: 0.6976 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 294/300\n",
      "50000/50000 [==============================] - 5s 100us/step - loss: 0.8137 - acc: 0.6962 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 295/300\n",
      "50000/50000 [==============================] - 5s 104us/step - loss: 0.8163 - acc: 0.6979 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 296/300\n",
      "50000/50000 [==============================] - 5s 107us/step - loss: 0.8168 - acc: 0.6974 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 297/300\n",
      "50000/50000 [==============================] - 5s 103us/step - loss: 0.8153 - acc: 0.6970 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 298/300\n",
      "50000/50000 [==============================] - 5s 101us/step - loss: 0.8130 - acc: 0.7007 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 299/300\n",
      "50000/50000 [==============================] - 5s 102us/step - loss: 0.8170 - acc: 0.6979 - val_loss: 1.0531 - val_acc: 0.6419\n",
      "Epoch 300/300\n",
      "50000/50000 [==============================] - 5s 103us/step - loss: 0.8178 - acc: 0.6985 - val_loss: 1.0531 - val_acc: 0.6419\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "<keras.callbacks.History at 0x7fcf0e9cfef0>"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "wandb.init()\n",
    "model.fit(X_train,y_train,batch_size=batch_size,\n",
    "                        epochs=300,\n",
    "                        validation_data=(X_test, y_test),\n",
    "                        callbacks=[WandbCallback(),ReduceLROnPlateau()]\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
